package design.mode.effective_java.chapter2.item5;

import java.util.ArrayList;
import java.util.List;

/**
 * 不适当的使用静态
 *
 * @author ZhongMingde on 2021/8/3
 */

public class SpellChecker {
    private static final Lexicon dictionary = null;

    private SpellChecker() {

    }

    public static boolean isValid(String word) {
        return false;
    }

    public static List<String> suggestions(String typo) {
        return new ArrayList<>();
    }
}
/*
public class SpellChecker2 {
    private final Lexicon dictionary = null;
    private SpellChecker2() {}
    public static INSTANCE = new SpellChecker2();
    public boolean isValid(String word) {  };
    public List<String> suggestions(String typo) {  };
}*/
